﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using VisionRoc.Core;
using VisionRoc.Tool;

namespace VisionRoc_Measure
{
    public partial class FormLogSetTool : Form
    {
        public FormLogSetTool()
        {
            InitializeComponent();
        }

        private void FormLogSetTool_Load(object sender, EventArgs e)
        {
          
        }

        private void btn_SetPath_Click(object sender, EventArgs e)
        {
            try
            {
                txt_DtatPath.Text = Tool.OpenFileDialog();

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }

        private void FormLogSetTool_FormClosing(object sender, FormClosingEventArgs e)
        {

            DialogResult res = MessageBox.Show("是否保存当前数据？", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
            if (res == DialogResult.OK)  //1为确定，2为取消,...
            {
                try
                {
                    //Global.Set.DataPath = txt_DtatPath.Text;
                    //Global.Set.DataNum = Convert.ToInt32(txt_DataNum.Text);
                    MessageBox.Show("修改保存成功");
                }
                catch { MessageBox.Show("保存失败！"); }
            }
        }
    }
}
